Create a Master Key with Encryption
-
Open SQL Management Studio and connect to your database server.
-
In the Object Explorer on the left, expand the Databases folder.
-
Right-click on your live database and choose New Query:
-
In the right query pane, copy and paste or type CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'P@ssw0rd' to create a master key against the database you are running it on and encrypt it with the password P@ssw0rd. This password may be changed if needed.
-
Click the Execute button (highlighted in yellow), or press the <F5> key on your keyboard to run the query. You should see the following message:
Note: This error appears on your SQL Server after applying .NET Framework 4.5 and rebooting the server. It is usually caused by SqlDependency because the timer it creates, to clean up the service/queue, needs a conversation (to use BEGIN CONVERSATION TIMER). This conversation is started without specifying the ENCRYPTION = OFF clause, so it will need a database master key to store the generated session keys. Although this conversation never sends a message and session keys are not actually needed, the message is periodically logged into the ERRORLOG.